package 第9场小白入门赛;
import java.io.*;
import java.util.*;
public class 字符迁移 {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int q = Integer.parseInt(st.nextToken());
		String s = br.readLine();
		// 题目给的是长数据，所以开long
		long c[] = new long[n+10];
		long diff[] = new long[n+10];
		
		// 使得下标从1开始
		for(int i = 1; i <= s.length(); i++) {
			c[i] = s.charAt(i-1) - 'a';
		}
		
		int l,r,k;
		for(int i = 0 ; i < q; i++) {
			st = new StringTokenizer(br.readLine());
			l = Integer.parseInt(st.nextToken());
			r = Integer.parseInt(st.nextToken());
			k = Integer.parseInt(st.nextToken());
			
			diff[l] += k;
			diff[r+1] -= k;
			
		}
		// 差分前缀和
		for(int i = 1; i < diff.length; i++) {
			diff[i] += diff[i-1];
		}
		// 普通数组+差分数组
		for(int i = 1; i <= s.length(); i++) {
			c[i] += diff[i];
		}
		
		// 对前缀和后的数组进行取余，使其范围一直在0-26
		// 因为前面减过a，所以这里范围都会是0-26，只需要最后加a就是结果
		for(int i = 1; i <= s.length(); i++) {
			c[i] %= 26;
			System.out.print((char)(c[i] + 'a'));
		}
 		
		
	}
}
